<?php
declare (strict_types = 1);

namespace app\admin\controller;

use think\Request;

class Socket extends Base
{
    /**
     * 显示资源列表
     *
     * @return \think\Response
     */
    public function index()
    {
        //app('SendMessage')->bindUid();

    }
    public function bind($uid=0)
    {
        $data['client_id']=input('client_id');
        $data['uid']=$this->admin->id;
        app('SendMessage')->bindUid($data);
        return $this->success('绑定'.$this->admin->id.'成功');
    }


    public function send($uid=0)
    {
        $data['uid']=$uid;
        $data['message']=[
            'type'=>'client_message',
            'message'=>'订单己提交，请审核'
        ];
        app('SendMessage')->sendMsg($data);
        return $this->success('发送成功');
    }

}
